<template>
  <ych-modal
    :fullscreen="true"
    :bodyStyle="bodyStyle"
    :title="title"
    :visible="visible"
    :footer="null"
    :destroyOnClose="true"
    @cancel="handleCancel">
    <view-layout-redirect :view-code="viewCode"></view-layout-redirect>
  </ych-modal>
</template>

<script>

  import ViewLayoutRedirect from './ViewLayoutRedirect'

  export default {
    name: 'ViewLayoutRedirectModal',
    components: {
      ViewLayoutRedirect
    },
    data () {
      return {
        title: this.$t('m.common.button.preview'),
        visible: false,
        viewCode: null,
        bodyStyle: {
          padding: '10px',
          margin: '',
          backgroundColor: '#ececec'
        },
      }
    },
    methods: {
      handleCancel () {
        this.visible = false
      }
    }
  }
</script>
